package cn.liutao.dish.entity.po;

import cn.liutao.common.entity.BaseEntity;
import cn.liutao.common.entity.Validation;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 菜系表 实体类。
 *
 * @author liutao
 * @since 2023-10-31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "cuisine")
public class Cuisine extends BaseEntity implements Serializable {

    @Id(keyType = KeyType.Auto)
    @NotNull(message = "请选择要修改的内容",groups = Validation.EditGroup.class)
    private Integer id;

    /**
     * 菜系名称
     */
    @NotBlank(message = "名称不能为空",groups = Validation.AddGroup.class)
    private String name;

    /**
     * 描述
     */
    private String describe;

    /**
     * 启用状态：0禁用，1启用
     */
    private Integer status;

    /**
     * 排序字段(值越小，越靠前)
     */
    private Integer sort;

}
